/*
 * $Id: BaseDaoUI.java,v 1.6 2009/12/14 20:29:03 oliver Exp $
 *
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 *
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */

package com.ge.healthcare.autosc.ui.dao;

import com.ge.healthcare.autosc.common.ASCUtil;
import com.ge.healthcare.autosc.ui.pojo.AscUiObjectI;

public class BaseDaoUI {
	protected static String cleanupInputString(String string) {
		if (!ASCUtil.isNullOrEmpty(string)) {
			string = string.trim().toUpperCase();
		}
		return string;
	}
	protected static void setErrorMessage(AscUiObjectI object, Throwable e){
		object.setInError(true);
		object.setErrorMsg(e.getMessage());
	}
	protected static void setErrorMessage(AscUiObjectI object, Exception e){
		object.setInError(true);
		object.setErrorMsg(e.getMessage());
	}
	protected static void setErrorMessage(AscUiObjectI object, String msg){
		object.setInError(true);
		object.setErrorMsg(msg);
	}
}
